unit frm_empresafilial;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 
  Dialogs, StdCtrls, Buttons, Mask, DBCtrls, ExtCtrls, DBAdvEd, AdvEdit,
  AdvGlowButton;

type
  TFR_EmpresaFilial = class(TFrame)
    pnlEmpresa: TPanel;
    btnPesqEmpresa: TAdvGlowButton;
    edtEmpresa: TAdvEdit;
    edtCodEmpresa: TDBAdvEdit;
    procedure btnPesqEmpresaClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation

uses u_pesquisaempresa;

{$R *.dfm}

procedure TFR_EmpresaFilial.btnPesqEmpresaClick(Sender: TObject);
begin
  with TFRM_PesquisaEmpresa.Create(nil) do
  try
    if ShowModal = mrOK then
    begin
      edtCodEmpresa.IntValue := cdsPesquisarCOD_EMPRESA.AsInteger;
      edtEmpresa.Text        := cdsPesquisarDESCRICAO_MULTIEMPRESA.AsString;
    end;
  finally
    FreeAndNil(FRM_PesquisaEmpresa);
  end;
end;

end.
